﻿@model PagedList.IPagedList<FTBS.Models.Entities.TicketCart>
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />

@{
    ViewBag.Title = "Lịch sử đặt vé";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div style="background-color: white; width: 100%; min-height: 511px">
    <table style="background-color: white">
        <tr style="vertical-align: top">
            <td style="max-width: 400px">
                @Html.Partial("~/Views/Shared/_CustomerMenu.cshtml")
            </td>
            <td>
                <h2 style="font-weight: bold; text-align: center">Lịch sử đặt vé</h2>
                <div>
                    <table class="table border" border="2" style="text-align: left; background-color: lightyellow; max-width: 725px; margin: 0px 0px 0px 30px">
                        <tr>
                            <th>Mã hoá đơn</th>
                            <th>Ngày đặt vé</th>
                            <th>Tổng số vé</th>
                            <th style="text-align: right">Tổng giá vé (VNĐ)</th>
                            <th></th>
                        </tr>
                        @foreach (var item in Model)
                        {
                            <tr>
                                <td>@item.CartId</td>
                                <td>@item.CreateTime</td>
                                <td style="text-align: center">@item.TotalTicket</td>
                                <td style="text-align: right">@item.TotalPrice.ToString(@"0,000")</td>
                                <td>
                                    @Html.ActionLink("Chi tiết", "ViewTicketCartDetails", new { id = item.CartId })
                                </td>
                            </tr>
                        }
                    </table>
                </div>
                <div style="float: right">
                    <br />
                    <div style="float: right">
                        Trang @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) của @Model.PageCount trang
                    </div>
                    <div>
                        @Html.PagedListPager(Model, page => Url.Action("ViewPastBooking",
            new { page}))
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>
